package day07Test;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入月份");
        int num1 = sc.nextInt();
        System.out.println("请输入机票原价");
        int num2 = sc.nextInt();
        System.out.println("扣 1 选择头等舱，扣 0 选择经济舱");
        int num3 = sc.nextInt();
        String b = Ticket(num1, num2, num3);

        System.out.println(b);
    }

    public static String Ticket(int num1, int num2, int num3) {
        String a = " ";
        if (5 <= num1 && num1 <= 10) {
            if (num3 == 0) {
                a = "旺季经济舱价格为" + (.85 * num2);

            } else {
                a = "旺季头等舱价格为" + (.9 * num2);

            }
        } else if ((11 <= num1 && num1 <= 12) || (1 <= num1 && num1 <= 4)) {
            if (num3 == 0) {
                a = "旺季经济舱价格为" + (.65 * num2);

            } else {
                a = "旺季头等舱价格为" + (.7 * num2);

            }
        }
        return a;


    }

}
